<template>
	<el-form class="flowFromEditForm" ref="flowFromInfo" :inline="true" :model="flowFromInfo" label-width="80px">
		<el-form-item label="表单的key">
			<el-input v-model="flowFromInfo.ffKey"></el-input>
		</el-form-item>
		<el-form-item label="表单名称">
			<el-input v-model="flowFromInfo.ffName"></el-input>
		</el-form-item>
		<el-form-item label="表单描述">
			<el-input v-model="flowFromInfo.ffDescription"></el-input>
		</el-form-item>
		<el-form-item label="表单数据">
			<el-input v-model="flowFromInfo.ffData"></el-input>
		</el-form-item>
		<el-form-item label="分组">
			<el-input v-model="flowFromInfo.ffGroup"></el-input>
		</el-form-item>
		<el-form-item label="是否启用">
			<el-select v-model="flowFromInfo.ffEnable" style="width: 92%;"  placeholder="请选择">
				<el-option v-for="item in options.ffEnable" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
				</el-option>
			</el-select>
		</el-form-item>
	</el-form>
</template>
<script>
	import request from '@/utils/request'
	export default {
		name: 'flowFromEdit',
		props: ['flowFromInfo'],
		data() {
			return {
				//所有的下拉选项
				options: {
					ffEnable: [],
				}
			}
		},
		watch: {
			flowFromInfo: function(val) {

			}
		},
		//页面初始化加载
		created() {
			this.getFfEnable();
		},
		methods: {
			getFfEnable() {
				request({
					url: '/system/dict/query?dictGroupKey=common_enable',
					method: 'post'
				}).then(response => {
					this.options["ffEnable"] = response.data;
				})
			}
		}
	}
</script>
<style>
	.flowFromEditForm .el-form-item {
		width: 45%;
	}

	.flowFromEditForm .el-input {
		width: 100%;
	}
</style>
